package libcore.config;

import android.util.Log;
import androidx.annotation.NonNull;

public class LogUtil {

  private static String sTag = "LOG_JAAKSI";
  private static boolean isDebug = LibConfig.isDebug();

  public static void init(@NonNull String tag) {
    sTag = tag;
  }

  public static void i(String tag, String log) {
    if (isDebug) {
      Log.i(sTag, tag + ":" + log);
    }
  }

  public static void d(String tag, String log) {
    if (isDebug) {
      Log.d(sTag, tag + ":" + log);
    }
  }


  public static void e(String tag, String log) {
    if (isDebug) {
      Log.e(sTag, tag + ":" + log);
    }
  }

  public static void ef(String tag, String format, Object... args) {
    if (isDebug) {
      Log.e(sTag, tag + ":" + String.format(format, args));
    }
  }
}
